package com.atguigu.realtime.gmallpublisher.util

/**
 * Author atguigu
 * Date 2020/11/14 10:21
 */
object DSLUtil {
    def getDSL = {
        """
          |{
          |  "query": {
          |    "match_all": {}
          |  }
          |}
          |""".stripMargin
    }
    
    def getHourDSL = {
        """{
          |  "aggs": {
          |    "group_by_hour": {
          |      "terms": {
          |        "field": "logHour",
          |        "size": 24
          |      }
          |    }
          |  }
          |}""".stripMargin
    }
}
